

function addSensorbitCod(Blockly) {




    Blockly.Python.microbit_button = function(block) {
        var dropdown_microbitButton = this.getFieldValue('microbitButton');
        Blockly.Python.definitions_['import_microbit'] = 'from microbit import *\n';
        Blockly.Python.definitions_['import_Button'] = 'from input import button\n';
        // Blockly.Python.definitions_['import_button'] = '\n';
        var code =   'button.is_pressed('+ dropdown_microbitButton +')';
        return [code];
      }

    return Blockly;
}

module.exports = addSensorbitCod;

